<template>
  <div class="container">
    <div class="table">
      <el-table
        :data="tableData"
        style="width: 80%; height: 98%; background-color: rgba(34, 34, 34, 0.5)"
        v-loading="loading"
        :row-style="getRowClass"
        :header-cell-style="{ background: '#101E44', color: '#606266' }"
        fit
        height="750"
      >
        <el-table-column prop="Id" label="序号" width="70"> </el-table-column>
        <el-table-column prop="t001" label="设备品种"></el-table-column>
        <el-table-column prop="t002" label="企业编号"></el-table-column>
        <el-table-column prop="t003" label="规格型号"></el-table-column>
        <el-table-column prop="t004" label="注册编码"></el-table-column>
        <el-table-column prop="t005" label="检验单位"></el-table-column>
        <el-table-column prop="t006" label="投用时间"></el-table-column>
        <el-table-column prop="t007" label="上次检验"></el-table-column>
        <el-table-column prop="t008" label="检验结论"></el-table-column>
        <el-table-column prop="t009" label="检验周期"></el-table-column>
        <el-table-column prop="t010" label="下次报检"></el-table-column>
        <el-table-column prop="t011" label="检验报告"></el-table-column>
      </el-table>
    </div>
    <div class="page">
      <el-pagination
        background
        @size-change="pageSizeChange"
        @current-change="pageChange"
        :current-page="currentPage"
        :page-sizes="[15, 30, 50, 80]"
        :page-size="pageSize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="total"
      >
      </el-pagination>
    </div>
  </div>
</template>
<script>
import { req } from "@/api/base/BaseApi";
export default {
  created() {
    this.searchList();
  },
  data() {
    return {
      tableData: [
        {
          Id: 1,
          t001: "冶金桥式起重机",
          t002: "一钢轧 008",
          t003: "QD200/63-23.5A7",
          t004: "41003405002006080017",
          t005: "马鞍山钢铁股份有限公司特种设备检验检测中心",
          t006:"2013/12/3",
          t007:"2020/6/15",
          t008:"合格",
          t009:'1年',
          t010:'2021/11/18',
          t011:""
        },
        {
          Id: 2,
          t001: "冶金桥式起重机",
          t002: "一钢轧 003",
          t003: "QD190/63-22.3A7",
          t004: "40103405022003090602",
          t005: "马鞍山钢铁股份有限公司特种设备检验检测中心",
          t006:"2017/10/26",
          t007:"2018/11/05",
          t008:"合格",
          t009:'1年',
          t010:'2020/2/1',
          t011:""
        },
      ], // 表格数据
      total: 2, // 表格数据总项数
      loading: false, // 表格是否在加载
      pageSize: 30, // 默认一页15项数据
      currentPage: 1,
    };
  },
  props: {
    checkUnit: String,
  },
  methods: {
    // 获取数据
    async searchList() {},
    // 页面大小改变
    async pageSizeChange(pageSize) {},
    // 页数改变
    async pageChange(page) {},
    getRowClass({ row, column, rowIndex, columnIndex }) {
      console.log("调用行样式");
      return {
        background: "#06134A",
        color: "#72C22D",
      };
    },
  },
};
</script>
<style lang="less" scoped>
.container {
  display: flex;
  flex-direction: column;
}
</style>